package com.xiaodeng.xdblogspringboot.anno;

import com.xiaodeng.xdblogspringboot.validation.ApplicationValidation;
import com.xiaodeng.xdblogspringboot.validation.StateValidation;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;


    @Target(ElementType.FIELD)
    @Retention(RetentionPolicy.RUNTIME)
    @Constraint(validatedBy = ApplicationValidation.class)
    public @interface ApplicationState {
        String message() default ("申请状态只能是待审核，审核通过，审核失败");
        //指定分组
        Class<?>[] groups() default {};
        //负载，获取state注解的附加信息
        Class<? extends Payload>[] payload() default {};
    }


